get directory of file c#

115

c# read file current directory -

var path = Path.Combine(Directory.GetCurrentDirectory(), "\\fileName.txt");

get folders in directory c# -

string[] folders = System.IO.Directory.GetDirectories(@"C:\My Sample Path\","*", System.IO.SearchOption.AllDirectories);

Comments

Submit
0 Comments